package com.bx.controller;

import com.bx.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name StudentController
 * @Author BaiXin
 * @Date 2022-10-22 19:44
 */
@RestController
@RequestMapping("/students")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/{id}")
    public String updateById(@PathVariable Integer id){
        studentService.updateById(id);
        System.out.println(id);
        return "修改完成";

    }
}
